package org.morningangel.android.bean;

import java.io.Serializable;
import java.util.Date;

import org.morningangel.bean.Activity;
import org.morningangel.util.MyDateFormat;

public class SearchActivity implements Serializable {
	private static final long serialVersionUID = -9011259903838462417L;
	//是否成功
	//private String isSucess;
	//活动Id
	private String activityId;
	//搜索活动列表中每一栏的主要图片
    private String searchMainImgUrl;
    //活动标题
    private String activityTitle;             
    //活动举行时间
    private String activityTime;             
    //活动举行地址
    private String activityAddress;    
    // 参加人数
    private String activityPartipateNum; 
    //  感兴趣人数
    private String activityInterestNum;
    // 活动完成时间
    private String finishDate;
    
    public SearchActivity() {
    	//this.isSucess = "0";
    }
    
    public SearchActivity(Activity activity) {
    	//this.isSucess = "1";
    	this.activityId = "" + activity.getId();
    	this.searchMainImgUrl = activity.getImage();
    	this.activityTitle = activity.getTitle();
    	this.activityTime = MyDateFormat.format("MM/dd HH:mm", activity.getStartTime()) + " - " + MyDateFormat.format("HH:MM", activity.getEndTime());
    	this.activityAddress = activity.getAddress();
    	this.activityPartipateNum = activity.getPartipateNum() + "";
		this.activityInterestNum = activity.getInterestNum() + "";
		Date now = new Date();
		this.finishDate = ((activity.getStartTime().getTime() - now.getTime()) / (1000 * 60 * 60 * 24)) + "";
    }

	/*public String getIsSucess() {
		return isSucess;
	}

	public void setIsSucess(String isSucess) {
		this.isSucess = isSucess;
	}*/

	public String getActivityId() {
		return activityId;
	}

	public void setActivityId(String activityId) {
		this.activityId = activityId;
	}

	public String getSearchMainImgUrl() {
		return searchMainImgUrl;
	}

	public void setSearchMainImgUrl(String searchMainImgUrl) {
		this.searchMainImgUrl = searchMainImgUrl;
	}

	public String getActivityTitle() {
		return activityTitle;
	}

	public void setActivityTitle(String activityTitle) {
		this.activityTitle = activityTitle;
	}

	public String getActivityTime() {
		return activityTime;
	}

	public void setActivityTime(String activityTime) {
		this.activityTime = activityTime;
	}

	public String getActivityAddress() {
		return activityAddress;
	}

	public void setActivityAddress(String activityAddress) {
		this.activityAddress = activityAddress;
	}

	public String getActivityPartipateNum() {
		return activityPartipateNum;
	}

	public void setActivityPartipateNum(String activityPartipateNum) {
		this.activityPartipateNum = activityPartipateNum;
	}

	public String getActivityInterestNum() {
		return activityInterestNum;
	}

	public void setActivityInterestNum(String activityInterestNum) {
		this.activityInterestNum = activityInterestNum;
	}

	public String getFinishDate() {
		return finishDate;
	}

	public void setFinishDate(String finishDate) {
		this.finishDate = finishDate;
	}
    
    
}
